package com.markedquilt.homepage.client;
/*
 * PackageName: com.markedquilt.homepage.client
 * Author:   coke
 * Date:     Created in 2020/12/27 18:54
 * Description:
 * History:
 * <author>        <time>             <version>          <desc>
 * 作者姓名         修改时间            版本号              描述
 * coke           2020/12/27 18:54     1.0
 */

import com.markedquilt.homepage.CourseInfo;
import com.markedquilt.homepage.CourseInfosRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author ZhangKe
 * @Description 通过Feign访问课程微服务
 * @date 2020/12/27 18:54.
 */
@FeignClient(value = "eureka-client-homepage-course",
fallback = CourseClientHystrix.class)
public interface CourseClient {

    @GetMapping("/homepage-course/get/course")
    CourseInfo getCourseInfo(Long id);

    @PostMapping("/homepage-course/get/courses")
    List<CourseInfo> getCourseInfos(@RequestBody CourseInfosRequest request);
}
